isPentagonal		 :: Integer -> Bool
isPentagonal x = 
	let y = ((ceiling.sqrt) (2.0 / 3.0 * fromIntegral x )) in 
		x == y * (3 * y - 1) `div` 2

pentagonalNumbers = scanl (+) 1 [4,7..]
		
isHexagonal 		:: Integer -> Bool
isHexagonal x =
	let y = ((ceiling.sqrt.(/2)) (fromIntegral x)) in
		x == y * (2 * y - 1)
		
euler_045 = [a | a<-pentagonalNumbers, isHexagonal a]
 !! 2
